<!-- reportingResults -->
<template>
    <div class="page">
        <!-- 导航栏 -->
        <!-- <div class="navBar">
            <customNavBar :leftTetx=leftTetx :titleTest=titleTest></customNavBar>
        </div> -->
        <div style="text-align: left; padding-left: 13px; margin-top: 30px;" @click="goreportingJst()">
         <img class='contentg' src="../../assets/img/features/closeIcon.png" alt="">
        </div>
        <div class='cetjecsty'>
        <span >报告生成结果</span> 
        </div>
        <!-- 页面内容 -->
        <div class="content">
            <div style="margin-top: 61px;">
                <van-image width=46vw height=38vw :src="wkjs" />
            </div>
            <div class='progressc'>
                您好，您目前无<span>【可检视的人身险保单】</span>无法开展保单检视。若您对此结果有疑问，可拨打客服电话*。
            </div>
        </div>
    </div>
    <div class='pageBj' v-if="showDialog">
        <div class="pageBjDiv">
        <div class='pageBjDivHeader'>温馨提示</div>
        <div class='pageBjDivsection'>您确认要退出本次服务吗?</div>
        <div class="pageBjDivBtoom">
            <div @click="onConfirm()">继续退出</div>
            <div @click="onCancel()">取消</div>
        </div>
        </div>
    </div>
</template>

<script lang="ts" setup name="reportingResultscz">
import { useRouter, useRoute } from "vue-router"
import { Toast } from '/@/utils/Message';
import { onMounted } from "vue"
import { reactive, ref } from 'vue'
import customNavBar from "/src/components/NavBar/customNavBar.vue"
import wkjs from "../../assets/img/tast/wkjs.png"

const router = useRouter()
const route = useRoute()
const leftTetx = ref("")
const titleTest = ref("提示无可检视保单")
const spanOne = ref("已生成报告，请")
const aText = ref("查看报告")
const showDialog = ref<boolean>(false)

const onConfirm = () => {
  // window.location.replace('./reportingResultwxts')
  router.push({ path: 'reportingResultwxts' })
}
const onCancel = () => {
  // 取消操作
  showDialog.value = false;
}
const goreportingJst = ():void => {
  showDialog.value = true
}

const backHome = () => {
  // 获取 User Agent
  var userAgent = navigator.userAgent.toLowerCase();
    // 判断是否在微信中打开
    if (userAgent.indexOf('micromessenger') !== -1) {
        setTimeout(function () {
        //这个可以关闭安卓系统的手机
        document.addEventListener(
            "WeixinJSBridgeReady",
            function () {
            WeixinJSBridge.call("closeWindow");
            },
            false
        );
        //这个可以关闭ios系统的手机
        WeixinJSBridge.call("closeWindow");
        } ,500);
    } else {
        console.log('当前页面不在微信中打开');
        if (userAgent.indexOf("Firefox") != -1 || userAgent.indexOf("Chrome") != -1) {
        window.location.href = "about:blank";
        } else if (userAgent.indexOf('Android') > -1 || userAgent.indexOf('Linux') > -1) {
        window.opener = null; window.open('about:blank', '_self', '').close();
        } else {
        window.opener = null;
        window.open("about:blank", "_self");
        window.close();
        }
    }
}
</script>

<!-- less嵌套设置 -->
<style lang="less" scoped>
.pageBj {
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  position: absolute;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  .pageBjDiv {
    width: 300px;
    // padding: 10px 20px;
    border-radius: 10px;
    background: #ffffff;
    .pageBjDivHeader {
      margin-top: 17px;
      font-size: 14px;
      font-weight: bold;
    }
    .pageBjDivsection {
      margin-top: 17px;
      font-size: 13px;
    }
    .pageBjDivBtoom {
      display: flex;
      width: 100%;
      margin-top: 17px;
      justify-content: center;
      border-top: 1px solid #f3f3f3;
      div {
        padding: 10px 0;
        width: 50%;
      }
      div:last-child{
        color: #ffffff;
        background: #2c56ce;
        border-bottom-right-radius: 7px;
      }
    }
  }
}
.contentg{
  width: 30px;
  height: 27px;
}
.page {
    background-color: #FFFFFF;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    .content {
        width: 100%;
        padding-top: 68px;
        overflow: hidden;

        .progress {
            margin-top: 36px;
            margin-left: 20%;
            margin-right: 20%;
        }
        .progressd {
            color: #222222;
            font-size: 14px;
            font-weight: 500;
            margin-top: 22px;
            span {
                color: #007DFA;
            }
        }
        .progressc {
            // width: 317px;
            width: 84%;
            margin: 0 auto;
            // margin-left: 34px;
            font-size: 14px;
            color: #222222;
            font-weight: 200;
            margin-top: 22px;
            text-align: left;
            letter-spacing: 1.7px;
            span {
                color: #007DFA;
                font-weight: bold;
            }
        }
    }
}
</style>

